<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
	<meta charset="UTF-8">
	<link rel="shortcut icon" href="favicon.ico">
	<link rel="stylesheet" href="css/iconfont.css">
	<link rel="stylesheet" href="css/global.css">
	<link rel="stylesheet" href="css/bootstrap.min.css">
	<link rel="stylesheet" href="css/bootstrap-theme.min.css">
	<link rel="stylesheet" href="css/swiper.min.css">
	<link rel="stylesheet" href="css/styles.css">
	<script src="js/jquery.1.12.4.min.js" charset="UTF-8"></script>
	<script src="js/bootstrap.min.js" charset="UTF-8"></script>
	<script src="js/swiper.min.js" charset="UTF-8"></script>
	<script src="js/global.js" charset="UTF-8"></script>
	<script src="js/jquery.DJMask.2.1.1.js" charset="UTF-8"></script>
	<!--
    	作者：L
    	时间：2021-12-12
    	描述：js 下拉框
    -->
		<script src="js/jquery.DJMask.2.1.1.js" charset="UTF-8"></script>
	<script src="js/index2.js"></script> 
	<link rel="stylesheet" type="text/css" href="css/center.css">
	 <script type="text/javascript">
		$(function(){//第一步都得写这个
			$(document).on("click",".centers_listm_one_in",function(){
			$(this).next(".gjszmdm").slideToggle().siblings("gjszmdm").slideUp()
			});
		})
	
			/*$(document).ready(function(){ $('.to-top').toTop({position:false}) });*/
		</script>
	<link rel="stylesheet" href="css/logo.css" />
</head>
<body>
	<!-- 顶部tab -->
	<div id="dingdan">
	
	</div>
	<!-- 顶部标题 -->
	<div class="bgf5 clearfix">
		<div class="top-user">
			<div class="inner">
				<a class="logo" href="index.html"><li id="logo"></li></a>
				<div class="title">个人中心</div>
			</div>
		</div>
	</div>
	<div class="content clearfix bgf5">
		<section class="user-center inner clearfix">
			<div class="pull-left bgf">
			 <div id="caidan" style="position: absolute;">
            	
            </div>
			<div class="pull-right" style="    position: absolute;
    left: 373px;
    width: 855px;
    height: 1000px;">
				<div class="user-content__box clearfix bgf">
					<div class="title">用户优惠劵</div>
										<ul class="nav user-nav__title" role="tablist">
											<li role="presentation" class="nav-item active"><a href="#useful" aria-controls="useful" role="tab" data-toggle="tab">未使用</a></li>
											<li role="presentation" class="nav-item "><a href="#used" aria-controls="used" role="tab" data-toggle="tab">已使用</a></li>
											<li role="presentation" class="nav-item "><a href="#overdue" aria-controls="overdue" role="tab" data-toggle="tab">已过期</a></li>
										</ul>
										
										<div class="tab-content">
											<div role="tabpanel" class="tab-pane fade in active" id="useful">
												<table >
													<tbody id="neirong">
						
													</tbody>
												</table>
													
												
												<div class="page text-right clearfix">
													<a class="disabled">上一页</a>
													<a class="select">1</a>
													<a href="">2</a>
													<a href="">3</a>
													<a class="" href="">下一页</a>
												</div>
											</div>
											<div role="tabpanel" class="tab-pane fade" id="used">
												
												
												<table >
													<tbody id="neirong2">
													
													</tbody>
												</table>
													
											
												
												<div class="page text-right clearfix">
													<a class="disabled">上一页</a>
													<a class="select">1</a>
													<a href="">2</a>
													<a href="">3</a>
													<a class="" href="">下一页</a>
												</div>
											</div>
											<div role="tabpanel" class="tab-pane fade" id="overdue">
												<table >
													<tbody id="neirong3">
													
													</tbody>
												</table>
												<div class="page text-right clearfix">
													<a class="disabled">上一页</a>
													<a class="select">1</a>
													<a href="">2</a>
													<a href="">3</a>
													<a class="" href="">下一页</a>
												</div>
											</div>
										</div>
									</div>
								</div>
							</section>
						</div>
						<!-- 右侧菜单 -->
						<div class="right-nav">
							<ul class="r-with-gotop">
								<li class="r-toolbar-item">
									<a href="udai_welcome.html" class="r-item-hd">
										<i class="iconfont icon-user" data-badge="0"></i>
										<div class="r-tip__box"><span class="r-tip-text">用户中心</span></div>
									</a>
								</li>
								<li class="r-toolbar-item">
									<a href="udai_shopcart.html" class="r-item-hd">
										<i class="iconfont icon-cart"></i>
										<div class="r-tip__box"><span class="r-tip-text">购物车</span></div>
									</a>
								</li>
								<li class="r-toolbar-item">
									<a href="udai_collection.html" class="r-item-hd">
										<i class="iconfont icon-aixin"></i>
										<div class="r-tip__box"><span class="r-tip-text">我的收藏</span></div>
									</a>
								</li>
								<li class="r-toolbar-item">
									<a href="" class="r-item-hd">
										<i class="iconfont icon-liaotian"></i>
										<div class="r-tip__box"><span class="r-tip-text">联系客服</span></div>
									</a>
								</li>
								<li class="r-toolbar-item">
									<a href="issues.html" class="r-item-hd">
										<i class="iconfont icon-liuyan"></i>
										<div class="r-tip__box"><span class="r-tip-text">留言反馈</span></div>
									</a>
								</li>
								<li class="r-toolbar-item to-top">
									<i class="iconfont icon-top"></i>
									<div class="r-tip__box"><span class="r-tip-text">返回顶部</span></div>
								</li>
							</ul>
							<script>
								$(document).ready(function(){ $('.to-top').toTop({position:false}) });
							</script>
						</div>
						<!-- 底部信息 -->
						<div class="footer" style="position: absolute;
    top: 1300px;
    width: 100%;">
							<div class="footer-tags">
								<div class="tags-box inner">
									<div class="tag-div">
										<img src="images/icons/footer_1.gif" alt="厂家直供">
									</div>
									<div class="tag-div">
										<img src="images/icons/footer_2.gif" alt="一件代发">
									</div>
									<div class="tag-div">
										<img src="images/icons/footer_3.gif" alt="美工活动支持">
									</div>
									<div class="tag-div">
										<img src="images/icons/footer_4.gif" alt="信誉认证">
									</div>
								</div>
							</div>
							<div class="footer-links inner">
								<dl>
									<dt>XXX</dt>
									<a href="temp_article/udai_article10.html"><dd>企业简介</dd></a>
									<a href="temp_article/udai_article11.html"><dd>加入U袋</dd></a>
									<a href="temp_article/udai_article12.html"><dd>隐私说明</dd></a>
								</dl>
								<dl>
									<dt>服务中心</dt>
									<a href="temp_article/udai_article1.html"><dd>售后服务</dd></a>
									<a href="temp_article/udai_article2.html"><dd>配送服务</dd></a>
									<a href="temp_article/udai_article3.html"><dd>用户协议</dd></a>
									<a href="temp_article/udai_article4.html"><dd>常见问题</dd></a>
								</dl>
								<dl>
									<dt>新手上路</dt>
									<a href="temp_article/udai_article5.html"><dd>如何成为代理商</dd></a>
									<a href="temp_article/udai_article6.html"><dd>代销商上架教程</dd></a>
									<a href="temp_article/udai_article7.html"><dd>分销商常见问题</dd></a>
									<a href="temp_article/udai_article8.html"><dd>付款账户</dd></a>
								</dl>
							</div>
							<div class="copy-box clearfix">
								<ul class="copy-links">
									<a href="agent_level.html"><li>网店代销</li></a>
									<a href="class_room.html"><li>U袋学堂</li></a>
									<a href="udai_about.html"><li>联系我们</li></a>
									<a href="temp_article/udai_article10.html"><li>企业简介</li></a>
									<a href="temp_article/udai_article5.html"><li>新手上路</li></a>
								</ul>
								<!-- 版权 -->
								<p class="copyright">
									© 2005-2017 XXX 版权所有，并保留所有权利<br>
									ICP备案证书号：闽ICP备XXX号-2&nbsp;&nbsp;&nbsp;&nbsp;福建省宁德市XXX&nbsp;&nbsp;&nbsp;&nbsp;Tel: XXX&nbsp;&nbsp;&nbsp;&nbsp;E-mail: XXX@qq.com
								</p>
							</div>
						</div>
						<script>
									//顶端导入
		$("#dingdan").load("index_head.html");
	memu ();
	function memu ()
	{
	
		var list = "";
		$.ajax({
				xhrFields:{withCredentials: true},
		    type: "post",//请求方式
		    url: "http://localhost:16111/user/MenuSelect",//上s层的路径
			dataType: "json",
		    data:{},//传值
		  
		    success: function (data)
			{
				var user = eval('(' + JSON.stringify(data.data) + ')');
				
				
				list += '<div class=\"centers_listm_one\">'+
            	'<img src=\"images/zshy.png\"/>'+
                '<a href='+user.memu_url+'><em>'+user.memu_name+'</em></a>'+
            	'</div>';
            	for(var i in user.childMemu)
            	{
            		
            		list +='<div class=\"centers_listm_one_in\">'+
                '<img src=\"images/kouw.png\"/>'+
                '<em>'+user.childMemu[i].memu_name+'</em>'+
                '<b></b>'+
            	'</div>'+
            	'<span class="gjszmdm">';
            		for(var x in user.childMemu[i].childMemu)
            		{
            			if(user.childMemu[i].childMemu[x].memu_name=="宝贝收藏")
            			{
            				list += 
		                '<a href='+user.childMemu[i].childMemu[x].memu_url+'?userid='+sessionStorage.getItem("userid")+' class=\"center_in_self\"  target =\"_blank\"><font>'+user.childMemu[i].childMemu[x].memu_name+'</font></a>';
            			}else if(user.childMemu[i].childMemu[x].memu_name=="我的足迹")
            			{ 	
            				list += 
		                '<a href='+user.childMemu[i].childMemu[x].memu_url+'?userid='+sessionStorage.getItem("userid")+' class=\"center_in_self\" target =\"_blank\"><font>'+user.childMemu[i].childMemu[x].memu_name+'</font></a>';
            			}else 
            			{
            				list += 
		                '<a href='+user.childMemu[i].childMemu[x].memu_url+' class=\"center_in_self\"><font>'+user.childMemu[i].childMemu[x].memu_name+'</font></a>';
            			}
            			
		            	
            		}
            		list+='</span>';
            	} 
            	
            	$("#caidan").html(list);
		   }
		})		
		
	}
</script>
						<script type="text/javascript">
								function getCookie(cookieName) {
    var strCookie = document.cookie;
    var arrCookie = strCookie.split("; ");
    for(var i = 0; i < arrCookie.length; i++){
        var arr = arrCookie[i].split("=");
        if(cookieName == arr[0]){
            return arr[1];
        }
    }
    return "";
}
							function cha()
							{
								
							$.ajax({
									xhrFields:{withCredentials: true},
									url: "http://localhost:16111/activity/chahb",
									mimeType: "post",
									dataType: "json",
									data:{
										users:getCookie("userid"),
									},
										
									success: function(date){
									
										var str="";
										
										var wmk="";
										for (i in date) { 
											if(date[i].threshold==0){
												wmk="无门槛";
												
											}else {
												wmk="满"+date[i].preferentialway+"减"+date[i].parvalue+"元"
											}	
											var time=new Date(date[i].collectiontime);
											var time2=time.getFullYear()+"-"+(time.getMonth()+1)+"-"+time.getDay();
											var time3=new Date(date[i].timedata);
											var time4=time3.getFullYear()+"-"+(time3.getMonth()+1)+"-"+(time3.getDate());
											
											str+=	"<div class='coupon-list' style='float:left;margin-right:4.5px'>"+
											"<div class='coupon'>"+
											"<div class='coupon-hd' >"+
															"<b>"+"<small class='fz16'>¥"+"</small>"+date[i].parvalue.toFixed(2)+"</b>"+
															"<div class='fz12'>【使用期限】<br>"+time2
															+"至"+time4+"</div>"+
														"</div>"+
														"<div class='coupon-bd'>"+
															"<div class='fz12 c9'>券号："+date[i].id+"</div>"+
															"<div class='fz12 c9'>规则：" +wmk+"</div>"+
														"</div>"+
														"<a href='搜索界面.html' class='coupon-ft'>立即使用</a>"+
														"</div>"+
														"</div>";
							
						
										}
									if(str==""){
										str=
												"<div class='coupon-list' style='margin-left:250px'>"+
																		"<div class='empty-msg'>哇，居然没有优惠券了？</div>"+
																	"</div>";
									}
									document.getElementById("neirong").innerHTML=str;
										
										// alert(document.getElementById("kan").innerHTML)
										
									},
								});
							}
								setTimeout(cha(),1000);;
							
							function cha2(){
							$.ajax({
									xhrFields:{withCredentials: true},
									url: "http://localhost:16111/activity/chasyhb",
									mimeType: "post",
									dataType: "json",
									data:{
										users:getCookie("userid"),
									},
										
									success: function(date){
									
										var str="";
										var wmk="";
										 
										for (i in date) { 
											if(date[i].threshold==0){
												wmk="无门槛";
												
											}else {
												wmk="满"+date[i].preferentialway+"减"+date[i].parvalue+"元"
											}	
											var time=new Date(date[i].collectiontime);
											var time2=time.getFullYear()+"-"+(time.getMonth()+1)+"-"+time.getDate();
											var time3=new Date(date[i].timedata);
											var time4=time3.getFullYear()+"-"+(time3.getMonth()+1)+"-"+(time3.getDate());
											str+=	"<div class='coupon-list' style='float:left;margin-right:4.5px'>"+
											"<div class='coupon' >"+
											"<div class='coupon-hd' >"+
															"<b>"+"<small class='fz16'>¥"+"</small>"+date[i].parvalue.toFixed(2)+"</b>"+
															"<div class='fz12'>【使用期限】<br>"+time2
															+"至"+time4+"</div>"+
														"</div>"+
														"<div class='coupon-bd'>"+
															"<div class='fz12 c9'>券号："+date[i].id+"</div>"+
															"<div class='fz12 c9'>规则：" +wmk+"</div>"+
														"</div>"+
														"<a href='javascript:;' class='coupon-ft'>已使用</a>"+
														"</div>"+
														"</div>";
							
								
										}
										if(str==""){
											str=
													"<div class='coupon-list' style='margin-left:250px'>"+
																			"<div class='empty-msg'>哇，居然没有优惠券了？</div>"+
																		"</div>";
										}
									
									document.getElementById("neirong2").innerHTML=str;
										
										// alert(document.getElementById("kan").innerHTML)
										
									},
								});
							}
							setTimeout(cha2(),1000);
							
							
							
							function cha3(){
								
							$.ajax({
									xhrFields:{withCredentials: true},
									url: "http://localhost:16111/activity/chagqhb",
									mimeType: "post",
									dataType: "json",
									data:{
										users:getCookie("userid"),
									},
										
									success: function(date){
									
										var str="";
										var wmk="";
										
										
										for (i in date) { 
											
											var time=new Date(date[i].collectiontime);
											var time2=time.getFullYear()+"-"+(time.getMonth()+1)+"-"+(time.getDate());
											var time3=new Date(date[i].timedata);
											var time4=time3.getFullYear()+"-"+(time3.getMonth()+1)+"-"+(time3.getDate());
											
											if(date[i].threshold==0){
												wmk="无门槛";
												
											}else {
												wmk="满"+date[i].preferentialway+"减"+date[i].parvalue+"元"
											}					
											str+="<div class='coupon-list' style='float:left;margin-right:4.5px'>"+
											"<div class='coupon' >"+
											"<div class='coupon-hd' >"+
															"<b>"+"<small class='fz16'>¥"+"</small>"+date[i].parvalue.toFixed(2)+"</b>"+
															"<div class='fz12'>【使用期限】<br>"+time2
															+"至"+time4+"</div>"+
														"</div>"+
														"<div class='coupon-bd'>"+
															"<div class='fz12 c9'>券号："+date[i].id+"</div>"+
															"<div class='fz12 c9'>规则：" +wmk+"</div>"+
														"</div>"+
														"<a href='javascript:;' class='coupon-ft'>已过期</a>"+
														"</div>"+
														"</div>";
							
								
										}
										if(str==""){
											str=
													"<div class='coupon-list' style='margin-left:250px'>"+
																			"<div class='empty-msg'>哇，居然没有优惠券了？</div>"+
																		"</div>";
										}
								
									document.getElementById("neirong3").innerHTML=str;
										
										// alert(document.getElementById("kan").innerHTML)
										
									},
								});
								
								
							}
							
								setTimeout(cha3(),1000);
						   var js=	setTimeout(function(){
								$.ajax({
										xhrFields:{withCredentials: true},
										url: "http://localhost:16111/activity/sggq",
										mimeType: "post",
								
										dataType: "json",
										
											
										success: function(date){
										cha();
										cha2();
										cha3();
										
											
								
											
										},
									});
							}
							,100)
					
						</script>
					</body>
					</html>